package com.ruoyi.withdrawal.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.ruoyi.withdrawal.mapper.WithdrawalMapper;
import com.ruoyi.withdrawal.domain.Withdrawal;
import com.ruoyi.withdrawal.service.IWithdrawalService;
import com.basic.service.impl.BaseServiceImpl;

/**
 * 提现管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-17
 */
@Service
public class WithdrawalServiceImpl extends BaseServiceImpl<Long, Withdrawal> implements IWithdrawalService 
{
    public WithdrawalServiceImpl(WithdrawalMapper baseMapper) {
		super(baseMapper);
		// TODO Auto-generated constructor stub
	}
    /**
     * 查询提现管理
     * 
     * @param id 提现管理主键
     * @return 提现管理
     */
    @Override
    public Withdrawal selectById(Integer id)
    {
        return baseMapper.selectById(id);
    }

    /**
     * 查询提现管理列表
     * 
     * @param withdrawal 提现管理
     * @return 提现管理
     */
    @Override
    public List<Withdrawal> selectList(Withdrawal withdrawal)
    {
        return baseMapper.selectList(withdrawal);
    }

    /**
     * 新增提现管理
     * 
     * @param withdrawal 提现管理
     * @return 结果
     */
    @Override
    public int insert(Withdrawal withdrawal)
    {
        return baseMapper.insert(withdrawal);
    }

    /**
     * 修改提现管理
     * 
     * @param withdrawal 提现管理
     * @return 结果
     */
    @Override
    public int update(Withdrawal withdrawal)
    {
        return baseMapper.update(withdrawal);
    }

    /**
     * 批量删除提现管理
     * 
     * @param ids 需要删除的提现管理主键
     * @return 结果
     */
    @Override
    public int deleteByIds(Integer[] ids)
    {
        return baseMapper.deleteByIds(ids);
    }

    /**
     * 删除提现管理信息
     * 
     * @param id 提现管理主键
     * @return 结果
     */
    @Override
    public int deleteById(Integer id)
    {
        return baseMapper.deleteById(id);
    }
	@Override
	public Withdrawal getWithdrawalForUpdate(int id) {
		
		WithdrawalMapper withdrawalMapper = this.getBaseMapper();
		return withdrawalMapper.selectByIdForUpdate(id);
	}
}
